package cn.tedu.spring;

import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
//@Scope("prote")不是单例的
//@Lazy  懒加载模式
public class UserMapper {

    public void userMapper(){
        System.out.println("\tUserMapper.userMapper");
    }

    @PostConstruct
    public void init(){
        System.out.println("\tUserMapper.init");
    }
    @PreDestroy
    public void destroy(){
        System.out.println("\tUserMapper.destroy");
    }
}
